<div id="navigationContainer">
  <% if session[:user] != nil %>
		<div class="navigation <%= current_page?(:action => 'home')?'navigationSelected':'' %>" style="border-top-left-radius: 5px;-webkit-border-radius: 5px 0 0 0;-moz-border-radius: 5px 0 0 0;">
			<div class="navigationItem"><%= link_to_unless_current "Home", :controller => "apo", :action => "home" %></div>
		</div>
		<div class="navigation navigationDrop membersDrop <%= current_page?(:controller => 'members', :action => 'list')?'navigationSelectedAlt':
					(current_page?(:action => 'officers') || current_page?(:action => 'committees'))?'navigationSelectedAlt2':'' %>">
			<div class="navigationItem"><%= link_to_unless_current "Members", :controller => "members", :action => "list" %></div>
			<ul class="navigationMenu">
				<li>
					<%= link_to_unless_current "Officers", :controller => "members", :action => "officers" %>
				</li>
				<li>
					<%= link_to_unless_current "Committees", :controller => "members", :action => "committees" %>
				</li>
			</ul>
		</div>
		<div class="navigation <%= current_page?(:controller => 'documents', :action => 'list')?'navigationSelected':'' %>">
			<div class="navigationItem"><%= link_to_unless_current "Documents", :controller => "documents", :action => "list" %></div>
		</div>
		<div class="navigation navigationDrop aboutDrop <%= current_page?(:controller => 'events', :action => 'list')?'navigationSelectedAlt':
					(current_page?(:action => 'calendar') || current_page?(:action => 'old_list') ||
					current_page?(:action => 'old_semester_list'))?'navigationSelectedAlt2':'' %>">
			<div class="navigationItem"><%= link_to_unless_current "Events", :controller => "events", :action => "list" %></div>
			<ul class="navigationMenu">
				<li>
					<%= link_to_unless_current "Calendar", :controller => "events", :action => "calendar" %>
				</li>
				<li>
					<%= link_to_unless_current "Upcoming Events", :controller => "events", :action => "list" %>
				</li>
				<li>
					<%= link_to_unless_current "Past Events", :controller => "events", :action => "old_list" %>
				</li>
				<li>
					<%= link_to_unless_current "Past Semesters", :controller => "events", :action => "old_semester_list" %>
				</li>
			</ul>
		</div>
		<div class="navigation navigationDrop profileDrop <%= current_page?(:action => 'show', :id => session[:user])?'navigationSelectedAlt':'' %>">
			<div class="navigationItem"><%= link_to_unless_current session[:user].first_name, :controller => "members", :action => "show", :id => session[:user] %></div>
			<ul class="navigationMenu">
				<li>
					<%= link_to "Logout", :controller => "apo", :action => "logout" %>
				</li>
			</ul>
		</div>
		<% if session[:user].admin %>
		<div class="navigation <%= current_page?(:controller => 'members', :action => 'admin')?'navigationSelected':'' %>">
			<div class="navigationItem"><%= link_to_unless_current "Admin", :controller => "members", :action => "admin" %></div>
		</div>
		<% end %>
		<div class="navigation" style="border-top-right-radius: 5px;-webkit-border-radius: 0 5px 0 0;-moz-border-radius: 0 5px 0 0;">
			<div class="navigationItem"><%= link_to "Contact", {:controller => "emailer", :action => "comments"}, :popup => ['new_window', 'height=235,width=350'] %></div>
		</div>
		<div id="memberSearchContainer">
			<% form_tag :controller => "apo", :action => "name_select_show" do %>
		    <%= text_field_with_auto_complete :member, :name, {:value => "find member"}, :url => {:controller => "apo", :action => "auto_complete_for_member_name"}, :skip_style => true %> <%= submit_tag "Go" %>
			<% end %>
		</div>
  <% else %>
		<div class="navigation navigationDrop aboutDrop <%= current_page?(:action => 'about')?'navigationSelectedAlt':
					(current_page?(:action => 'leadership') ||
					current_page?(:action => 'fellowship') ||
					current_page?(:action => 'service') ||
					current_page?(:action => 'umoc'))?'navigationSelectedAlt2':'' %>" style="border-top-left-radius: 5px;-webkit-border-radius: 5px 0 0 0;-moz-border-radius: 5px 0 0 0;">
			<div class="navigationItem"><%= link_to_unless_current "About APO", :action => "about" %></div>
			<ul class="navigationMenu">
				<li>
					<%= link_to_unless_current "Ugly Man on Campus", :controller => "apo", :action => "umoc" %>
				</li>
			</ul>
		</div>
		<div class="navigation <%= current_page?(:action => 'rush')?'navigationSelected':'' %>">
			<div class="navigationItem"><%= link_to_unless_current("Rush " + Event.getFormattedSemesterByIndex(Event.getCurrentSemester), {:action => "rush"}) %></div>
		</div>
		<div class="navigation <%= current_page?(:action => 'login')?'navigationSelected':'' %>" style="border-top-right-radius: 5px;-webkit-border-radius: 0 5px 0 0;-moz-border-radius: 0 5px 0 0;">
			<div class="navigationItem"><%= link_to_unless_current("Login", {:action => "login"}) %></div>
		</div>
  <% end %>
</div>
<div id="tooltip">&nbsp;</div>
<div id="popupBox">&nbsp;</div>
<div id="darken">&nbsp;</div>
<noscript><div id="enableJavascript">Please enable JavaScript!</div></noscript>
<% if flash[:error] %>
	<div id="noticeWrapper">
		<div class="noticeBox"><%= flash[:error] %></div>
	</div>
<% end %>
